import { ApiProperty } from '@nestjs/swagger';
import { IsEmail, IsNotEmpty, IsOptional } from 'class-validator';

export class UpdateAdminUserDto {
	@ApiProperty({
		required: false,
		description: '昵称',
	})
	@IsOptional()
	nickname: string;

	@ApiProperty({
		required: true,
		description: '密码',
	})
	password: string;

	@ApiProperty({
		required: true,
		description: '角色',
	})
	@IsNotEmpty()
	roleId: number;

	@ApiProperty({
		required: false,
		description: '头像',
	})
	@IsOptional()
	avatar: string;

	@ApiProperty({
		required: false,
		description: '头像',
	})
	@IsOptional()
	phone: string;

	@ApiProperty({
		required: false,
		description: '头像',
	})
	@IsOptional()
	@IsEmail()
	email: string;
}
